Xbasic

*RTF_TO_PLAIN Function

Syntax

Text as C = *RTF_TO_PLAIN(C text)

Arguments

Text

Plain ASCII text without encoding.

text

ASCII RTF encoded text.

Description

Convert from rtf to plain text.

Discussion

The *RTF_TO_PLAIN() function converts ASCII encoded RTF text to plain text.

Example

dim tbl as P
dim rtftext as C
tbl = table.open("customer")
tbl.fetch_first()
rtftext = *rtf_to_plain(tbl.rtfmemo)
? rtftext
= "{\rtf1\ansi \deff0{\colortbl;\red0\green0\blue0;}{\fonttbl{\f0\fswiss Arial;}{\f1\fnil Verdana, Arial, Helvetica, sans;}}{{\f1 \cf1 \fs24 George lived on top of a mountain. }}}"
plain_text = *rtf_to_plain(rtftext)
? plain_text
= "George lived on top of a mountain. "

See Also